package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.entity.po.Teach;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;
@Mapper
public interface TeachMapper {
    @InsertProvider(value = TeachProvider.class,method = "insert")
    int insert(Teach record);

    @Select("select * from teach where course = #{course}")
    List<Teach> selectByCourse(String course);

    @Select("select * from teach where teacher = #{teacher}")
    List<Teach> selectByTeacher(String teacher);

    @UpdateProvider(value = TeachProvider.class,method = "update")
    int updateByPrimaryKey(Teach record);
}